package com.schoolMall.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * @author:zyh
 * @Time:2021-09-02-9:29
 * @email:1269231889@qq.com
 */
public class ModelUtil {

    public static Map<String,Object> fail(String msg){
        Map<String,Object> model = new HashMap<>();
        model.put("success",false);
        model.put("msg",msg);
        return model;
    }

    public static <T> Map<String,Object> success(T data){
        Map<String,Object> model = new HashMap<>();
        model.put("success",true);
        model.put("msg",data);
        return model;
    }
}
